<template>
    <el-table
        :data="list"
        style="width: 100%;padding-top: 15px;"
    >
        <el-table-column
            label="Order_No"
            min-width="200"
        >
            <template slot-scope="scope">
                {{ scope.row.order_no | orderNoFilter }}
            </template>
        </el-table-column>
        <el-table-column
            label="Price"
            width="195"
            align="center"
        >
            <template slot-scope="scope">
                ¥{{ scope.row.price | toThousandFilter }}
            </template>
        </el-table-column>
        <el-table-column
            label="Status"
            width="100"
            align="center"
        >
            <template slot-scope="{row}">
                <el-tag :type="row.status | statusFilter">
                    {{ row.status }}
                </el-tag>
            </template>
        </el-table-column>
    </el-table>
</template>

<script>
// import { transactionList } from '@/api/remote-search'

export default {
	filters: {
		statusFilter(status) {
			const statusMap = {
				success: 'success',
				pending: 'danger'
			}
			return statusMap[status]
		},
		orderNoFilter(str) {
			return str.substring(0, 30)
		}
	},
	data() {
		return {
			list: [
				{
					order_no: '41e7AcAf-43cB-D85C-EDA3-ED81dcCedF9e',
					timestamp: 713233474011,
					username: 'Gary Allen',
					price: 13551,
					status: 'success'
				},
				{
					order_no: 'E348C8D2-1fD2-15Fc-8c46-9251Edb49245',
					timestamp: 713233474011,
					username: 'Anna Smith',
					price: 11472.23,
					status: 'pending'
				},
				{
					order_no: 'c96C22dD-d2F4-57A8-d8CD-ABA84Dc4EADa',
					timestamp: 713233474011,
					username: 'Carol Harris',
					price: 11332,
					status: 'pending'
				},
				{
					order_no: 'BABD51e6-C9C3-E191-ABdA-be126dFDAAc0',
					timestamp: 713233474011,
					username: 'Richard Lopez',
					price: 11087.2,
					status: 'success'
				},
				{
					order_no: 'fBBfAb72-322f-F34d-1BCf-5becC3c67970',
					timestamp: 713233474011,
					username: 'Robert Hall',
					price: 11442.6,
					status: 'pending'
				},
				{
					order_no: 'ED36af07-fEeC-BdD7-7085-DDAC68Cc86Eb',
					timestamp: 713233474011,
					username: 'Susan Jackson',
					price: 13484.2,
					status: 'pending'
				},
				{
					order_no: '3fd3eC3e-9BF6-7386-FCd2-AeF5DACD141D',
					timestamp: 713233474011,
					username: 'Sharon Clark',
					price: 5184.22,
					status: 'pending'
				},
				{
					order_no: 'eCbAE2df-2968-41bd-Fc3F-7cd8EcbD45Ae',
					timestamp: 713233474011,
					username: 'Ruth Jackson',
					price: 4926.8,
					status: 'pending'
				},
				{
					order_no: 'bd3c6Bd4-C1bb-42D3-e9D7-D232cF3E3fe1',
					timestamp: 713233474011,
					username: 'Jennifer Lee',
					price: 14755,
					status: 'pending'
				},
				{
					order_no: 'f94CF6c1-bc46-d183-E2E7-C8Aa8EeD57bc',
					timestamp: 713233474011,
					username: 'Donna Clark',
					price: 5279,
					status: 'pending'
				}
			]
		}
	},
	created() {},
	methods: {}
}
</script>
